<!DOCTYPE html>
<html>
<head>
    <title>人员管理</title>
	<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.empName" @keyup.enter="query" placeholder="请输入用户名">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
             <#if shiro.hasPermission("fun:emp:showEmp")>
            <a class="btn btn-primary"  @click="empShow">查看</a>
            </#if>
            <#if shiro.hasPermission("fun:emp:export")>
            <a class="btn btn-info" @click="exportExcel"><i class="fa fa-file-excel-o"></i>&nbsp;导出</a>
            </#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>
    <div v-show="!showList" class="panel panel-default">
        <div class="grid-btn">
            <a class="btn btn-warning"  @click="reload">返回</a>
        </div>
        <el-collapse v-model="activeNames" @change="handleChange">
            <el-collapse-item title="基本信息" name="1">
                <el-descriptions  class="margin-top" :column="2"  border>
                    <template>
                        <el-descriptions-item label="姓名">
                            <el-tag size="small">{{emp.empName}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="所在部门">
                            <el-tag size="small">{{emp.deptName}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="职名（务）">
                            <el-tag size="small">{{emp.office}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="性别">
                            <el-tag size="small">{{emp.genderStr}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="出生日期">
                            <el-tag size="small">{{emp.birthDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="民族">
                            <el-tag size="small">{{emp.nationality}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="年龄">
                            <el-tag size="small">{{emp.age}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="籍贯">
                            <el-tag size="small">{{emp.nativePlace}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="联系方式">
                            <el-tag size="small">{{emp.mobile}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="政治面貌">
                            <el-tag size="small">{{emp.politicalBackground}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="学历">
                            <el-tag size="small">{{emp.education}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="毕业院校">
                            <el-tag size="small">{{emp.graduateSchool}}</el-tag>
                        </el-descriptions-item>

                        <el-descriptions-item label="入职本单位时间">
                            <el-tag size="small">{{emp.joinDeptTime}}</el-tag>
                        </el-descriptions-item>

                        <el-descriptions-item label="通讯地址">
                            <el-tag size="small">{{emp.addr}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="状态">
                            <el-tag size="small">{{emp.statusStr}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="用工性质">
                            <el-tag size="small">{{emp.employMode}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="身份证号">
                            <el-tag size="small">{{emp.idCard}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="医保号">
                            <el-tag size="small">{{emp.medicalId}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="档案号">
                            <el-tag size="small">{{emp.archivesId}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="工作号">
                            <el-tag size="small">{{emp.workId}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="社保号">
                            <el-tag size="small">{{emp.societySafeguardId}}</el-tag>
                        </el-descriptions-item>

                        <el-descriptions-item label="技能等级">
                            <el-tag size="small">{{emp.skillGrade}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="技能工种">
                            <el-tag size="small">{{emp.skillKid}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="技能鉴定通过日期">
                            <el-tag size="small">{{emp.skillPassDate}}</el-tag>
                        </el-descriptions-item>

                        <el-descriptions-item label="合同开始日期">
                            <el-tag size="small">{{emp.contractStartDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="合同结束日期">
                            <el-tag size="small">{{emp.contractEndDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="解除合同日期">
                            <el-tag size="small">{{emp.contractRelieveDate}}</el-tag>
                        </el-descriptions-item>

                        <el-descriptions-item label="是否军人">
                            <el-tag size="small">{{emp.isSolider}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否干部">
                            <el-tag size="small">{{emp.isLeader}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否实习">
                            <el-tag size="small">{{emp.isInternship}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="备注">{{emp.remarks}}</el-descriptions-item>
                    </template>
                </el-descriptions>
                <!--<span>工作经历</span>
                <ul>
                    <li v-for="work in works">
                        <el-descriptions  class="margin-top" :column="2"  border>
                            <template>
                            <el-descriptions-item label="公司名称">
                                <el-tag size="small">{{work.company}}</el-tag>
                            </el-descriptions-item>
                            <el-descriptions-item label="职务">
                                <el-tag size="small">{{work.position}}</el-tag>
                            </el-descriptions-item>
                            <el-descriptions-item label="开始时间">
                                <el-tag size="small">{{work.startDate}}</el-tag>
                            </el-descriptions-item>
                            <el-descriptions-item label="结束时间">
                                <el-tag size="small">{{work.endDate}}</el-tag>
                            </el-descriptions-item>
                            <el-descriptions-item label="备注">
                                <el-tag size="small">{{work.remarks}}</el-tag>
                            </el-descriptions-item>
                            </template>
                        </el-descriptions>
                    </li>
                </ul>
                <span>奖惩记录</span>
                <ul>
                    <li v-for="reward in rewards">
                        <el-descriptions  class="margin-top" :column="2"  border>
                            <template>
                            <el-descriptions-item label="奖惩名称">
                                <el-tag size="small">{{reward.name}}</el-tag>
                            </el-descriptions-item>
                            <el-descriptions-item label="日期">
                                <el-tag size="small">{{reward.date}}</el-tag>
                            </el-descriptions-item>
                            <el-descriptions-item label="描述">
                                <el-tag size="small">{{reward.content}}</el-tag>
                            </el-descriptions-item>
                            </template>
                        </el-descriptions>
                    </li>
                </ul>-->
                <!--机务段字段-->

                <el-descriptions v-show="formData[0].isShow" class="margin-top" :column="2"  border>
                    <template>
                        <el-descriptions-item label="是否有检修组组长资格">
                            <el-tag size="small">{{empAttachment.isPosessJxQualification}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取消检修班组组长资格日期">
                            <el-tag size="small">{{empAttachment.cancelJxQualificationDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否有整备组组长资格">
                            <el-tag size="small">{{empAttachment.isPosessZbQualification}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取消整备班组组长资格日期">
                            <el-tag size="small">{{empAttachment.cancelZbQualificationDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否有运用组组长资格">
                            <el-tag size="small">{{empAttachment.isPosessYyQualification}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取消运用班组组长资格日期">
                            <el-tag size="small">{{empAttachment.cancelYyQualificationDate}}</el-tag>
                        </el-descriptions-item>
                    </template>
                </el-descriptions>

                <!--客运段字段-->
                <el-descriptions v-show="formData[1].isShow" class="margin-top" :column="2"  border>
                    <template>
                        <el-descriptions-item label="是否有值班员资格">
                            <el-tag size="small">{{empAttachment.isPosessZbyQualification}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取得值班员资格日期">
                            <el-tag size="small">{{empAttachment.getZbyQualificationDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否有普车车长资格">
                            <el-tag size="small">{{empAttachment.isPosessPczQualification}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取得普车车长资格日期">
                            <el-tag size="small">{{empAttachment.getPczQualificationDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否有动车资格">
                            <el-tag size="small">{{empAttachment.isPosessDcQualification}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="是否有动车车长资格">
                            <el-tag size="small">{{empAttachment.isPosessDczQualification}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取得动车车长资格日期">
                            <el-tag size="small">{{empAttachment.getDczQualificationDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取消值班员资格日期">
                            <el-tag size="small">{{empAttachment.cancelZbyQualificationDate}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="取消车长资格日期">
                            <el-tag size="small">{{empAttachment.cancelCzQualificationDate}}</el-tag>
                        </el-descriptions-item>
                    </template>
                </el-descriptions>
            </el-collapse-item >
            <el-collapse-item title="部门变动记录" name="2">
                <div class="block">
                    <div class="radio">
                        排序：
                        <el-radio-group v-model="reverse">
                            <el-radio :label="true">倒序</el-radio>
                            <el-radio :label="false">正序</el-radio>
                        </el-radio-group>
                    </div>
                    <template>
                        <el-timeline :reverse="reverse">
                            <el-timeline-item
                                    v-for="(activity, index) in changeEmpDept"
                                    :key="index"
                                    :timestamp="activity.date">
                                {{activity.deptNameAgo}}————>{{activity.deptName}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作人:{{activity.operator}}
                            </el-timeline-item>
                        </el-timeline>
                    </template>
                </div>
            </el-collapse-item>
            <el-collapse-item title="职名变动记录" name="3">
                <div class="block">
                    <div class="radio">
                        排序：
                        <el-radio-group v-model="reverse">
                            <el-radio :label="true">倒序</el-radio>
                            <el-radio :label="false">正序</el-radio>
                        </el-radio-group>
                    </div>
                    <template>
                        <el-timeline :reverse="reverse">
                            <el-timeline-item
                                    v-for="(activity, index) in changeEmpOffice"
                                    :key="index"
                                    :timestamp="activity.date">
                                {{activity.officeAgo}}————>{{activity.office}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作人:{{activity.operator}}
                            </el-timeline-item>
                        </el-timeline>
                    </template>
                </div>
            </el-collapse-item>
            <el-collapse-item title="岗位变动记录" name="4">
                <div class="block">
                    <template>
                        <el-timeline >
                            <el-timeline-item
                                    v-for="(activity, index) in empStatusChange"
                                    :key="index"
                                    :timestamp="activity.date">
                                {{activity.statusStr}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;不在岗原因:{{activity.causeStr}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作人:{{activity.operator}}
                            </el-timeline-item>
                        </el-timeline>
                    </template>
                </div>
            </el-collapse-item>
            <el-collapse-item title="新进记录" name="5" >
                <el-descriptions  class="margin-top" :column="3"  border>
                    <template>
                        <el-descriptions-item label="时间">
                            <el-tag size="small">{{addEmp.date}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="新进方式">
                            <el-tag size="small">{{addEmp.joinTypeStr}}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="操作人">
                            <el-tag size="small">{{addEmp.operator}}</el-tag>
                        </el-descriptions-item>
                    </template>
                </el-descriptions>
            </el-collapse-item>
        </el-collapse>
    </div>
</div>
<script src="${request.contextPath}/statics/js/modules/function/emp_show.js?_${.now?long}"></script>
</body>
</html>